home *** CD-ROM | disk | FTP | other *** search
- Path: colossus.holonet.net!mitch
- From: mitch@news.mdli.com (Mitch Miller)
- Newsgroups: comp.lang.c
- Subject: Problem with sscanf on DEC Alpha
- Date: 11 Jan 1996 16:48:12 GMT
- Organization: HoloNet National Internet Access System: 510-704-1058/modem
- Message-ID: <4d3f0c$mfq@colossus.holonet.net>
- NNTP-Posting-Host: jubal.mdli.com
- Summary: What's the correct input format for a double variable?
- X-Newsreader: TIN [version 1.2 PL2]
-
- I'm having a problem with a line in my program:
-
- sscanf( sInputLine, "%3d%3d%10.4f%10.4f", &iAtom1,
- &iAtom2, &(F3D->r3DV1), &(F3D->r3DV2) );
-
- F3D is a pointer to struct and the struct has double members
- r3DV1 and r3DV2.
-
- My input line consists of
- 4 5 9.4000 10.5000
-
- When I've compiled/run this on a VAX, both F3D->r3DV1 and F3D->r3DV2
- get assigned correctly 9.4 and 10.5. However, on the Alpha, both
- end up as 0.0. I've tried several variations on the %10.4f, to no
- avail. BTW, iAtom1 and iAtom2 are assigned correctly on both systems.
-
- Any ideas on how to resolve the problem?
-